
        
<div class="row">
  <div class="col-lg-12">
    <div class="card">
      <div class="card-body">
        
        <form  class="site-form">
          <div class="form-group">
            <label for="old-password">旧密码</label>
            <input type="password" class="form-control" name="oldpwd" id="oldpwd" placeholder="输入账号的原登录密码">
          </div>
          <div class="form-group">
            <label for="new-password">新密码</label>
            <input type="password" class="form-control" name="newpwd" id="newpwd" placeholder="输入新的密码">
          </div>
          <div class="form-group">
            <label for="conpwd">确认新密码</label>
            <input type="password" class="form-control" name="conpwd" id="conpwd" placeholder="确认新密码">
          </div>
          <button type="button" id = 'btn_pwd' class="btn btn-primary">修改密码</button>
        </form>

      </div>
    </div>
  </div>
  
</div>

<script type="text/javascript">
$(function(){
  $('#btn_pwd').click(function(){
      let oldpwd = $('#oldpwd').val();
      let newpwd = $('#newpwd').val();
      let conpwd = $('#conpwd').val();
      if(newpwd != conpwd ||newpwd=='' ){
        alert('密码为空或两次密码不一致！')
        return
      }

      $.ajax({
            "url":'/xt_user_pwdmodify',
            "async" : true,
            "dataType":'json',
            "data":{'oldpwd':oldpwd,'newpwd':newpwd,'conpwd':conpwd},
            "type" : "post",
            "success":function (data) {
              alert(data.mes)

            },    
            "error":function (res) {  
                alert(res)
            } 
      });

  })
})
        
</script>